package com.dlz.systemshop.mapper;

import com.dlz.systemshop.pojo.Admin;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * @author 你的姓名
 * @date 2025/1/4 02:50
 */
public interface UserMapper {
    @Insert("insert into vueshop_admin (username,avatar) values(#{username},#{avatar})")
    public Boolean saveVatar(String avatar, String username);

    @Update("update vueshop_admin set avatar = #{avatar} where username = #{username}")
    public Boolean updateUserAvatar(String avatar,String username);

    @Select("select * from vueshop_admin where username = #{username}")
    public Admin findUserByUsername(String username);

    @Select("SELECT  `avatar` FROM vueshop_admin WHERE username =  #{username}")
    public String getAvatarURL(String username);
}
